﻿package mortal.game.view.copy.GroupTowerCopy.command
{
    import Framework.MQ.*;
    import Message.Command.*;
    import Message.Public.*;
    import mortal.game.cache.*;
    import mortal.game.mvc.*;
    import mortal.game.net.broadCast.*;
    import mortal.game.view.copy.GroupTowerCopy.data.*;
    import mortal.mvc.core.*;

    public class GroupTowerCopyCommand extends BroadCastCall
    {

        public function GroupTowerCopyCommand(param1:Object)
        {
            super(param1);
            return;
        }// end function

        override public function call(param1:MessageBlock) : void
        {
            var _loc_3:IMessageBase = null;
            var _loc_4:SGroupTowerHurtInfoMsg = null;
            var _loc_2:* = param1.messageHead.command;
            _loc_3 = param1.messageBase;
            switch(_loc_2)
            {
                case EPublicCommand._ECmdPublicGroupTowerInfo:
                {
                    Cache.instance.copy.groupTower.towerInfo = _loc_3 as SGroupTowerMsg;
                    NetDispatcher.dispatchCmd(ServerCommand.GroupTowerCopyInfoRes, _loc_3);
                    break;
                }
                case EPublicCommand._ECmdPublicGroupTowerPass:
                {
                    Cache.instance.copy.groupTower.passInfo = _loc_3 as SGroupTowerPassMsg;
                    GroupTowerCopyUtil.isStarTime = false;
                    NetDispatcher.dispatchCmd(ServerCommand.GroupTowerCopyPass, _loc_3);
                    break;
                }
                case EPublicCommand._ECmdPublicGroupTowerEnd:
                {
                    Cache.instance.copy.groupTower.endInfo = _loc_3 as SGroupTowerEndMsg;
                    Cache.instance.copy.groupTower.isEnd = true;
                    NetDispatcher.dispatchCmd(ServerCommand.GroupTowerCopyEnd, _loc_3);
                    break;
                }
                case EPublicCommand._ECmdPublicGroupTowerHurtInfo:
                {
                    _loc_4 = _loc_3 as SGroupTowerHurtInfoMsg;
                    Cache.instance.copy.groupTower.hurtArr = _loc_4.topInfos;
                    NetDispatcher.dispatchCmd(ServerCommand.GroupTowerCopyHurtInfo, _loc_3);
                    break;
                }
                default:
                {
                    break;
                }
            }
            return;
        }// end function

    }
}
